Anton Lydike — Blog
Website GitHub

Running BAR on NixOS

Written: 2025-08-01
Tags: #snippet #how-to #nixos

Beyond all reason is a great game. It's open source, free to play, massive, and massively fun. It's a spiritual successor to Total Annihilation-style games, and just feel extremely nice. They have so many quality-of-life features for controlling units and such, it really is a lot of fun to play.

I have not yet been able to compile the Recoil Engine from scratch to run the game, but luckily they provide a much friendlier way of distribution: an AppImage.

In order to run this on NixOS, a couple of things need doing, I have documented them below:

  1. Download the BAR.appimage from their website
  2. Create a shell.nix next to the appimage that contains:
{ pkgs ? import <nixpkgs> {} }:
  pkgs.mkShell {
    # nativeBuildInputs is usually what you want -- tools you need to run
    nativeBuildInputs = with pkgs.buildPackages; [ appimage-run ];
    LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [
    stdenv.cc.cc.lib
    SDL2
    libogg
    libvorbis
    openal
    libGL
    libGLU
    zlib
    "/run/opengl-driver"
    "/run/opengl-driver-32"
    ];
}
  1. Open lutris, set the game options to:
    • Executable: /run/current-system/sw/bin/nix-shell
    • Arguments: shell.nix --run "appimage-run BAR.AppImage"
    • Working Directory: the folder containing both the appimage and the shell.nix file